package com.example.auto.demoforleothon.Model;

import com.example.auto.demoforleothon.View.IuserLogin;

public class UserBiz implements IuserBiz {

    @Override
    public void login(final String username, final String password, final OnloginListener onloginListener) {
        new Thread(new Runnable() {
            @Override
            public void run() {
                try{
                    Thread.sleep(3000);
                }catch (Exception e){
                    e.printStackTrace();
                }
                if(username.equals("123")&&password.equals("456")){
                    User user=new User();
                    user.setUsername(username);
                    user.setPassword(password);
                    onloginListener.LoginSuccess(user);
                }
            }
        }).start();
    }
}
